<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Publisher extends Model
{
    //是否有效:1有效, 0无效
    const VALID = 1;
    const INVALID = 0;

    protected $primaryKey = 'user_id';

    protected $fillable = ['user_id'];

    /**
     * 是否有效的发布者
     *
     * @return bool
     */
    public function isValid()
    {
        return $this->status == self::VALID;
    }
}
